package com.kong;

import com.kong.filter.AccessFilter;
import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.context.annotation.Bean;

/**
 * <dl>
 * <dd>Description: 网关配置启动类</dd>
 * <dd>Company: 大诚若谷信息技术有限公司</dd>
 * <dd>@date：2017/6/15 15:27</dd>
 * <dd>@author：Kong</dd>
 * </dl>
 */
//整合了@SpringBootApplication、@EnableDiscoveryClient、@EnableCircuitBreaker
@SpringCloudApplication
//开启网关
@EnableZuulProxy
public class ZuulApplication {

    public static void main(String[] args) {

        SpringApplication.run(ZuulApplication.class);

    }

    @Bean
    public AccessFilter accessFilter() {
        return new AccessFilter();
    }

}
